This repository has been archived by the owner on Feb 8, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 37
Take localClusterUri
into account in QuickInput
#679
Merged
gzdunek
merged 1 commit into
master
from
gzdunek/quick-input-take-local-cluster-uri-into-account
Mar 18, 2022
Merged
Take localClusterUri
into account in QuickInput
#679
gzdunek
merged 1 commit into
master
from
gzdunek/quick-input-take-local-cluster-uri-into-account
Mar 18, 2022
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
gzdunek
force-pushed
the
gzdunek/quick-input-take-local-cluster-uri-into-account
branch
from
March 18, 2022 10:02
78c02c7
to
92dd2fe
Compare
ravicious
approved these changes
Mar 18, 2022
const localClusterUri = | ||
this.workspacesService.getActiveWorkspace()?.localClusterUri; | ||
if (!localClusterUri) { | ||
return []; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good catch, I thought of this scenario once but then it escaped my head.
@@ -36,7 +36,7 @@ export default function useQuickInput() { | |||
const [activeSuggestion, setActiveSuggestion] = React.useState(0); | |||
const autocompleteResult = React.useMemo( | |||
() => quickInputService.getAutocompleteResult(inputValue), | |||
[inputValue] | |||
[inputValue, workspacesService.getActiveWorkspace()?.localClusterUri] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's just add a comment here explaining why it's in the dependency list to make sure we're highlighting a potential code smell.
gzdunek
force-pushed
the
gzdunek/quick-input-take-local-cluster-uri-into-account
branch
from
March 18, 2022 11:18
92dd2fe
to
9f1d088
Compare
gzdunek
deleted the
gzdunek/quick-input-take-local-cluster-uri-into-account
branch
March 18, 2022 11:29
ravicious
pushed a commit
that referenced
this pull request
Apr 26, 2022
ravicious
pushed a commit
that referenced
this pull request
Apr 27, 2022
ravicious
added a commit
that referenced
this pull request
Apr 27, 2022
* Take `localClusterUri` into account in `QuickInput` (#679) * Display cluster name for each connection * Automatically try to connect a connection when possible * Update connection icon * Always use root cluster URI to obtain `documentsService` in `useServerConnect` * Don't close the tab on non-zero exit code * Autocomplete database names for tsh proxy db * Change placeholder text in `ClusterAdd` * Show leaf cluster name when possible in Connections list * Hide kubes and apps * Force `TopBar` items to take full height * Change shortcut to open `QuickInput` * Update electron-builder to 23.0.3 Versions lower than 23.0.2 don't work on newest macOS, see: * electron-userland/electron-builder#6732 * electron-userland/electron-builder#6606 * remove `Navigator` code (#685) * Prevent breaking layout on long cluster name (#688) * Show username when possible in identity list (#687) * Update command for updating proto files * Update protobufs for Teleterm (LoginRequest params) This commit removes a bunch of unused protobufs and also updates some of those that got updated on the teleterm branch in the teleport repo. The biggest change from all of them is that LoginRequest now has oneof on Sso and Local. [1] This is because a login request should have either Sso or Local params, but not both at the same time. The previous implementation called both `setSso` and `setLogin` on the same object. This no longer works with the use of `oneof`, because calling `setLogin` after `setSso` would clear the `Sso` params. [2] [1] gravitational/teleport#10286 (comment) [2] https://developers.google.com/protocol-buffers/docs/proto3#oneof_features * Render ssh menu item as `NavLink` only when URL is provided * Use connection dropdown instead of modal for supplying SSH username * Adjust `Identity` layout, combine `logout` and `clusterRemove` into a single action * Change command `cluster-remove` to `cluster-logout` * Apply `Identity` design changes * Enable `babel-plugin-styled-components` in production and tests (#697) * Make connections icon bigger * Properly use `css` prop Co-authored-by: Grzegorz Zdunek <[email protected]> Co-authored-by: Grzegorz Zdunek <[email protected]>
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
No description provided.